import string

def str_part_reverse(string, sep_pos):
    '''
    rotate string, move the part after position sep_pos to start, and move part     before position sep_pos to end 
    string string that would be rotated
    sep_pos the position
    '''

    str_a = string[:sep_pos][::-1]
    str_b = string[sep_pos:][::-1]
    str_c = str_a + str_b
    string = str_c[::-1]
    return string

if __name__ == '__main__':
    string = 'abcdefgh'
    print string_part_reverse(string, 3)
